﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

public partial class Pages_Default : System.Web.UI.Page
{
    private DataAccess da = new DataAccess();
    public string strten = string.Empty;
    public Entities en = new Entities();
    protected void Page_Load(object sender, EventArgs e)
    {
        this.getAllSP();
    }

    private void getAllSP()
    {
        DataSet ds = new DataSet();
        SqlDataAdapter adt = new SqlDataAdapter();
        SqlCommand comm = new SqlCommand("getHang", da.SqlConn());
        comm.CommandType = CommandType.StoredProcedure;
        comm.Parameters.AddWithValue("@MaNhom", "");
        comm.Parameters.AddWithValue("@MaHang", "");
        comm.Parameters.AddWithValue("@Ten", "");
        comm.Connection.Open();
        adt.SelectCommand = comm;
        adt.Fill(ds);
        CollectionPager1.MaxPages = 100;
        CollectionPager1.PageSize = 4;
        CollectionPager1.DataSource = ds.Tables[0].DefaultView;
        CollectionPager1.BindToControl = DTL_SP;
        DTL_SP.DataSource = CollectionPager1.DataSourcePaged;
        DTL_SP.DataBind();   
    }
    protected void DTL_SP_ItemCommand(object source, DataListCommandEventArgs e)
    {

    }
}
